package com.hz.springbootschedule.utils;

import com.hz.springbootschedule.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author shkstart
 * @create 2023-02-13 9:37
 */
//@Configuration
@EnableScheduling
@EnableAsync
public class SaticScheduleTask {

    //@Scheduled(cron = "0/5 * * * * ?")
    @Async
    public void configureTasks(){
        System.out.println("任务时间"+Thread.currentThread().getName());

    }
}
